using System;
using System.Collections.Generic;
using System.Text;
using AugContracts;
using AugDB;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Data.DLinq;


namespace AugService {

  public class GenericService:IGenericService {

    public Dictionary<string, int> CountryList() {
    
      AugData xDB = new AugData(Global._ConnectionString);
      
      Dictionary<string, int> xResult = new Dictionary<string,int>();
      

  
      var q = from s in xDB.Countries select s;
      
      foreach(Country c in q) {
        xResult.Add(c.Content, c.CountryId);
      }
      return xResult;
      
    
    }

    public Dictionary<string, int> UserGroupList() {
    
      AugData xDB = new AugData(Global._ConnectionString);
      
      Dictionary<string, int> xResult = new Dictionary<string,int>();
      
      var q = from s in xDB.Groups select s;
      
      foreach(Group g in q) {
        xResult.Add(g.Name, g.GroupId);
      }
      return xResult;
    }
  
  }
}
